package com.chinacoal.microservice.fallback;

import com.chinacoal.microservice.WorkOrderClient;
import com.chinacoal.microservice.pojo.CcmsSmartleasingWorkOrder;
import com.chinacoal.microservice.util.CodeMsg;
import com.chinacoal.microservice.util.QueryCriteria;
import com.chinacoal.microservice.util.Result;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 运维管理-工单-异常回退类
 * @date 2020-12-16 17：52
 */
@Component
public class WorkOrderClientFallback implements WorkOrderClient {

    /**
     * @Description: 查询所有的工单信息（带分页）
     * @author zhuliang
     * @date 2020/12/16 18:00
     */
    @Override
    public Result<List<CcmsSmartleasingWorkOrder>> getAllByPage(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 条件查询所有的工单信息（带分页）
     * @author zhuliang
     * @date 2020/12/16 18:00
     */
    @Override
    public Result<List<CcmsSmartleasingWorkOrder>> getAllByCondition(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 处理工单信息
     * @author zhuliang
     * @date 2020/12/16 18:36
     */
    @Override
    public Result handleByWorkOrder(CcmsSmartleasingWorkOrder workOrder, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据工单id查询工单信息
     * @author zhuliang
     * @date 2020/12/16 18:37
     */
    @Override
    public Result<CcmsSmartleasingWorkOrder> getWorkOrderById(String pkWorkOrderId) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

}
